<template>
<div>
  <div class="courseIntroduction">
     <goBack title="课程介绍"></goBack>
    <div class="courseIntroduction-title">高帮帮圆梦大学</div>
    <div class="courseIntroduction-subtitle">展人生画卷 划未来蓝图</div>
    <!-- 选择地区/年份 -->
     <div class="introduce-wrap">
        <div
          class="introduce-wrap-item"
          v-for="(item,index) in info"
          :key="item.titile"
        >
          <introduceProject :index="index" :introduce="item" :readMore="true" @click="detail(item.id)"></introduceProject>
        </div>
      </div>
  </div>
</div>

</template>

<script setup>
import goBack from '../../components/goBack.vue';
import { getCourse } from '../../api/apiList/homePage.js';
import introduceProject from '../homePage/components/introduceProject.vue';
import { useRoute,useRouter } from 'vue-router';
import { onMounted, ref, reactive } from 'vue';
const route = useRoute();
const router = useRouter();
const tabIndex = route.query.tabIndex;

const detail = (id) => {
    router.push({ path: '/classIntroduce', query: { id} });
}
let info = ref({});

onMounted(async () => {
  // 获取列表数据 0招生信息 1大学推荐
    await getCourse().then((res) => {
    const { result } = res;
    info.value = result;
  });
  
});
</script>

<style lang="less" scoped>
.courseIntroduction {
  background-image: url('../../assets/images/enrollment-bg.png');
  background-size: 109vw;
  background-position: -20px -25px;
  background-repeat:no-repeat;
  .courseIntroduction-title {
     padding: 0 18px;
    font-size: 21px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #000493;
    line-height: 29px;
    letter-spacing: 1px;
    padding-top: 127px;
    margin-bottom: 4px;
  }
  .courseIntroduction-subtitle {
     padding: 0 18px;
    font-size: 14px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #4347d3;
    line-height: 20px;
    letter-spacing: 4px;
    margin-bottom: 46px;
  }
  .courseIntroduction-wrap-title {
     padding: 0 18px;
    display: flex;
    align-items: center;
    span {
      width: 3px;
      height: 17px;
      background: #8487e3;
      border-radius: 2px;
      margin-right: 3px;
    }
    font-size: 16px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #000000;
    line-height: 22px;
    letter-spacing: 4px;
    margin-bottom: 16px;
  }
  .schools-wrap {
    padding: 0 18px;
  }
  
}
 .introduce-wrap {
      margin-top: 15px;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      padding: 0 15px;
    }
// <div class="courseIntroduction">
//     <div class="courseIntroduction-title">高帮帮圆梦大学</div>
//     <div class="courseIntroduction-subtitle">展人生画卷 划未来蓝图备份</div>
//     <!-- 选择地区/年份 -->
//     <div class="courseIntroduction-wrap-title"><span></span>推荐高校</div>
//     <div class="schools-wrap" v-for="item in schools" :key="item">
//       <schoolProject></schoolProject>
//     </div>
//   </div>
</style>
